<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
    <title>jquery的ajax实现</title>
</head>
<body>
    <script>
        $(function(){
            $.ajax({
                method:'get',
                url:'http://hoa.hcoder.net/index.php?user=hcoder&pwd=hcoder&m=info&id=1',
                data:{'id':'2'},
                dataType:'json',
                success:function(msg){
                   document.write(msg.title+'\n'+msg.content);   
                }
            })
        })
    </script>
</body>
</html>